Optimal. Leaf size=105 \[ \frac {a^3 \sin ^5(c+d x)}{5 d}-\frac {5 a^3 \sin ^3(c+d x)}{3 d}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {3 a^3 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {13 a^3 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {13 a^3 x}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2757, 2635, 8, 2633} \[ \frac {a^3 \sin ^5(c+d x)}{5 d}-\frac {5 a^3 \sin ^3(c+d x)}{3 d}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {3 a^3 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {13 a^3 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {13 a^3 x}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2757
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+a \cos (c+d x))^3 \, dx &=\int \left (a^3 \cos ^2(c+d x)+3 a^3 \cos ^3(c+d x)+3 a^3 \cos ^4(c+d x)+a^3 \cos ^5(c+d x)\right ) \, dx\\ &=a^3 \int \cos ^2(c+d x) \, dx+a^3 \int \cos ^5(c+d x) \, dx+\left (3 a^3\right ) \int \cos ^3(c+d x) \, dx+\left (3 a^3\right ) \int \cos ^4(c+d x) \, dx\\ &=\frac {a^3 \cos (c+d x) \sin (c+d x)}{2 d}+\frac {3 a^3 \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{2} a^3 \int 1 \, dx+\frac {1}{4} \left (9 a^3\right ) \int \cos ^2(c+d x) \, dx-\frac {a^3 \operatorname {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {\left (3 a^3\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {a^3 x}{2}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {13 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {3 a^3 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {5 a^3 \sin ^3(c+d x)}{3 d}+\frac {a^3 \sin ^5(c+d x)}{5 d}+\frac {1}{8} \left (9 a^3\right ) \int 1 \, dx\\ &=\frac {13 a^3 x}{8}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {13 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {3 a^3 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {5 a^3 \sin ^3(c+d x)}{3 d}+\frac {a^3 \sin ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 63, normalized size = 0.60 \[ \frac {a^3 (1380 \sin (c+d x)+480 \sin (2 (c+d x))+170 \sin (3 (c+d x))+45 \sin (4 (c+d x))+6 \sin (5 (c+d x))+780 d x)}{480 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.16, size = 76, normalized size = 0.72 \[ \frac {195 \, a^{3} d x + {\left (24 \, a^{3} \cos \left (d x + c\right )^{4} + 90 \, a^{3} \cos \left (d x + c\right )^{3} + 152 \, a^{3} \cos \left (d x + c\right )^{2} + 195 \, a^{3} \cos \left (d x + c\right ) + 304 \, a^{3}\right )} \sin \left (d x + c\right )}{120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.79, size = 88, normalized size = 0.84 \[ \frac {13}{8} \, a^{3} x + \frac {a^{3} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {3 \, a^{3} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {17 \, a^{3} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {a^{3} \sin \left (2 \, d x + 2 \, c\right )}{d} + \frac {23 \, a^{3} \sin \left (d x + c\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 121, normalized size = 1.15 \[ \frac {\frac {a^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+3 a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.63, size = 117, normalized size = 1.11 \[ \frac {32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{3} - 480 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{3} + 45 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} + 120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3}}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.71, size = 105, normalized size = 1.00 \[ \frac {13\,a^3\,x}{8}+\frac {\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+\frac {91\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{6}+\frac {416\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{15}+\frac {133\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}+\frac {51\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.08, size = 272, normalized size = 2.59 \[ \begin {cases} \frac {9 a^{3} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {9 a^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {9 a^{3} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {8 a^{3} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 a^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {9 a^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {2 a^{3} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {a^{3} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {15 a^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {3 a^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\relax (c )} + a\right )^{3} \cos ^{2}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________